package com.ruoyi.OrderGoods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.OrderGoods.mapper.OrderGoodsMapper;
import com.ruoyi.OrderGoods.domain.OrderGoods;
import com.ruoyi.OrderGoods.service.IOrderGoodsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单商品中间 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-08
 */
@Service
public class OrderGoodsServiceImpl implements IOrderGoodsService 
{
	@Autowired
	private OrderGoodsMapper orderGoodsMapper;

	/**
     * 查询订单商品中间信息
     * 
     * @param id 订单商品中间ID
     * @return 订单商品中间信息
     */
    @Override
	public OrderGoods selectOrderGoodsById(Integer id)
	{
	    return orderGoodsMapper.selectOrderGoodsById(id);
	}
	
	/**
     * 查询订单商品中间列表
     * 
     * @param orderGoods 订单商品中间信息
     * @return 订单商品中间集合
     */
	@Override
	public List<OrderGoods> selectOrderGoodsList(OrderGoods orderGoods)
	{
	    return orderGoodsMapper.selectOrderGoodsList(orderGoods);
	}
	
    /**
     * 新增订单商品中间
     * 
     * @param orderGoods 订单商品中间信息
     * @return 结果
     */
	@Override
	public int insertOrderGoods(OrderGoods orderGoods)
	{
	    return orderGoodsMapper.insertOrderGoods(orderGoods);
	}
	
	/**
     * 修改订单商品中间
     * 
     * @param orderGoods 订单商品中间信息
     * @return 结果
     */
	@Override
	public int updateOrderGoods(OrderGoods orderGoods)
	{
	    return orderGoodsMapper.updateOrderGoods(orderGoods);
	}

	/**
     * 删除订单商品中间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteOrderGoodsByIds(String ids)
	{
		return orderGoodsMapper.deleteOrderGoodsByIds(Convert.toStrArray(ids));
	}
	
}
